/*
 * @Author: zhouzhiwei zzwchilong@163.com
 * @Date: 2025-05-04 22:48:58
 * @LastEditors: zhouzhiwei zzwchilong@163.com
 * @LastEditTime: 2025-06-15 10:29:07
 * @FilePath: \steel-cloud-static\static\asset\js\common.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
(function () {
    layui.use(function () {
        var layer = layui.layer;
        var table = layui.table;
        var laydate = layui.laydate;
        var form = layui.form;
        var dropdown = layui.dropdown;
        var tree = layui.tree;
        var element = layui.element;
        var util = layui.util;
        $.extend({
            layer: layer,
            laytable: table,
            laydate: laydate,
            layform: form,
            laydropdown: dropdown,
            laytree: tree,
            layelement: element,
            layutil: util
        })

    })
    $.extend({
        addTab: function (options, data) {
            data = data || {};
            $.ajax({
                type: "get",
                url: options.path,
                dataType: "html",
                success: function (res) {
                    $("#contentBody").html(res);
                },
                error: function (xhr, status, error) {
                    // 错误时的回调函数
                    alert("内容加载失败：" + status);
                }
            });
            // $("#contentBody").load(url, data, function (response, status, request) {

            // });
        }
    });
})(jQuery);